package com.yupi.yuapiinterface.utils;

import com.yupi.yuapiinterface.model.User;
import org.springframework.http.HttpRequest;

import javax.servlet.http.HttpServletRequest;

public class AuthUtils {


    /**
     *拿到当前登录用户
     */
    public static User getUser(HttpServletRequest request) {
        return (User) request.getSession().getAttribute("user");
    }

}
